﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TFProfileBlogNew.aspx.cs" Inherits="TFProfileBlogNew" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>新写文章</title>
<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="style/common.css" />
<link rel="stylesheet" type="text/css" href="style/Segment/Header.css" />
<link rel="stylesheet" type="text/css" href="style/Segment/pofile.css" />
<link rel="stylesheet" type="text/css" href="style/Segment/Search.css" />
<link rel="stylesheet" type="text/css" href="style/Segment/Siderbar.css" />
<link rel="stylesheet" type="text/css" href="style/Segment/Footer.css" />
<script type="text/javascript" src="js/footrip.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
       <Services>
           <asp:ServiceReference Path="WSLogin.asmx" />
       </Services>
     </asp:ScriptManager>
<div id="boxwide">
         <!--文章-->
         
         <h2 class="pageInfo"><span style="float:right;"><a href="tfprofileblog.aspx">返回文章首页</a></span>发表新文章</h2>
         <p style="color:Red" id="txtError"></p>
         <div class="BlogBox">
         <p style="padding-bottom:10px;" id="blogTypeList">
            <b>此文章类型为：</b>
            <input value="1" checked="checked" name="blog_type" type="radio" />游记
            <input value="2" name="blog_type" type="radio" />攻略 
            <input value="3" name="blog_type" type="radio" />文章 
         </p>
         <p><input id="txtNotes" type="text" /> <input type="button" value="添加标签" onclick="addPicNote()" class="butn_blue" /></p>
         <p><ul id="listPicNotes"></ul></p>

         <h2>标题：</h2><input type="text" id="txtTitle" class="TextTitle" />
         <h2>内容：</h2><textarea id="txtContent" cols="4" rows="6" class="TextTitle"></textarea>
         <p style="padding-top:10px;">谁能浏览这篇文章：<select id="" name="">
<option value="-1">只有我自己</option>
<option value="1">我的好友</option>
<option value="2">所有人</option>
</select></p>
         <p style="padding-top:20px;">
         <input type="button" id="btnPublish" onclick="public_click();" value="发 布" class="butn_green" />&nbsp;&nbsp;&nbsp;&nbsp;
         <input type="button" id="btnDraft" onclick="draft_click()" value="保存为草稿" class="butn_blue" /></p>
         </div>
        
         
         <!---->
        
         </div>
    </form>
</body>
</html>
<script type="text/javascript">
var rp = GetRequestParam();
if(rp)
{
    if(rp.blogId)
    {
        fillBlog();
        $("btnPublish").style.display = "block";
        $("btnDraft").style.display = "none";
    }
    else if(rp.tmpBlogId)
    {
        fillBlogTmp();
        $("btnPublish").style.display = "none";
        $("btnDraft").style.display = "block";
    }
}
function public_click()
{
    
    if(!rp)
    {
        InsertBlog();
    }
    else
    {
        if(rp.blogId)
        {
            UpdateBlog();
        }
    }
}

function draft_click()
{
    
    if(!rp)
    {
        InsertBlogTmp();
    }
    else
    {
        if(rp.tmpBlogId)
        {
            UpdateBlogTmp();
        }
    }
}
</script>